package cn.kgc.crowdfundingadmin.pojo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @author shkstart
 * @create 2020-03-09 19:34
 */
public class SecurityAdmin extends User {

    private static final long serialVersionUID = 1L;

    private Admin originalAdmin;


    public SecurityAdmin(Admin originalAdmin, Collection<? extends GrantedAuthority> authorities) {
        super(originalAdmin.getLoginacct(),originalAdmin.getUserpswd(),authorities);
        this.originalAdmin=originalAdmin;
    }


    public Admin getOriginalAdmin() {
        return originalAdmin;
    }
}
